<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/varify.js"></script>
<body>
	itcast ajax实例  用户名校验<br>
	<!-- ajax方式下不需要表单进行数据提交 -->
	<form name="login">
		<input type="text" name="username" id="username"  on="varify()"/><span id="result"> </span><br>
		<button type="submit">校验</button>
	</form>
</body>
</html>